﻿using Little.Soldier.SWIFT.Validation;
using System;
using System.Reflection;

namespace Little.Soldier.SWIFT.Validation.Block1
{
  [Serializable]
  public class Validate_ApplicationIdentifier : ValidatePropertyBase
  {
    public Validate_ApplicationIdentifier(PropertyInfo validateProperty, object parentPropertyObject)
      : base(validateProperty, parentPropertyObject)
    {
    }

    public Validate_ApplicationIdentifier(PropertyInfo validateProperty, object parentPropertyObject, bool allowEmptyValue)
      : base(validateProperty, parentPropertyObject, allowEmptyValue)
    {
    }

    protected override void InitializeRules()
    {
      this.Rules.Add((ValidationRuleBase) new ValidationRule_Length(1));
      this.Rules.Add((ValidationRuleBase) new ValidationRule_Enumeration(0 != 0, new string[4]
      {
        "f",
        "a",
        "l",
        "x"
      }));
    }
  }
}
